package com.feinno.urcs.group.siptask.task;

import com.feinno.superpojo.SuperPojo;
import com.feinno.superpojo.annotation.Field;
import com.feinno.urcs.types.MobileNo;
import org.helium.framework.task.DedicatedTaskArgs;

import java.util.Date;
import java.util.List;

/**
 * TODO: 需要完整的CPIM内容
 * Created by Lei Gao on 5/13/15.
 */
public class GroupMessageArgs extends SuperPojo implements DedicatedTaskArgs {
	@Field(id = 1)
	private int groupId;    //群ID
	@Field(id = 2)
	private String domain;
	@Field(id = 3)
	private String conversationId;//群conversationID
	@Field(id = 4)
	private String subject; //群组名称
	@Field(id = 5)
	private MobileNo fromMobile;
	@Field(id = 6)
	private MobileNo toMobile;
	@Field(id = 7)
	private String contentType;
	@Field(id = 8)
	private byte[] content;
	@Field(id = 9)
	private List<MobileNo> atMembers;
	@Field(id = 10)
	private boolean isPc;

	@Field(id = 11)
	private long groupMessageStorageId;

	@Field(id = 12)
	private boolean isOnlyActiveOfflineMsg = false;
	@Field(id = 13)
	private Date sendTime;

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	public boolean isFromFetion() {
		return fromFetion;
	}

	public void setFromFetion(boolean fromFetion) {
		this.fromFetion = fromFetion;
	}

	public boolean isPc() {
		return isPc;
	}

	@Field(id = 13)
	private boolean fromFetion = false;

	public boolean getIsPc() {
		return isPc;
	}

	public void setIsPc(boolean isPc) {
		this.isPc = isPc;
	}

	public List<MobileNo> getAtMembers() {
		return atMembers;
	}

	public void setAtMembers(List<MobileNo> atMembers) {
		this.atMembers = atMembers;
	}

	public int getGroupId() {
		return groupId;
	}

	public void setGroupId(int groupId) {
		this.groupId = groupId;
	}

	public MobileNo getFromMobile() {
		return fromMobile;
	}

	public void setFromMobile(MobileNo fromMobile) {
		this.fromMobile = fromMobile;
	}

	public MobileNo getToMobile() {
		return toMobile;
	}

	public void setToMobile(MobileNo toMobile) {
		this.toMobile = toMobile;
	}

	public String getContentType() {
		return contentType;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

	public byte[] getContent() {
		return content;
	}

	public void setContent(byte[] content) {
		this.content = content;
	}

	@Override
	public Object getTag() {
		return TagGenerator.generateTaskTag(toMobile, getGroupId());
	}

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public String getConversationId() {
		return conversationId;
	}

	public void setConversationId(String conversationId) {
		this.conversationId = conversationId;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public long getGroupMessageStorageId() {
		return groupMessageStorageId;
	}

	public void setGroupMessageStorageId(long groupMessageStorageId) {
		this.groupMessageStorageId = groupMessageStorageId;
	}

	public boolean isOnlyActiveOfflineMsg() {
		return isOnlyActiveOfflineMsg;
	}

	public void setIsOnlyActiveOfflineMsg(boolean isOnlyActiveOfflineMsg) {
		this.isOnlyActiveOfflineMsg = isOnlyActiveOfflineMsg;
	}
}
